package main

import "net/http"

func main() {
	// 2个参数：请求URL路径和处理响应和请求的匿名函数
	http.HandleFunc("/hello", func(writer http.ResponseWriter, r *http.Request) {
		s := r.URL.RawQuery
		writer.Write([]byte("hello,world." + s))
	})
	http.ListenAndServe(":8082", nil) // http://localhost:8082/hello
}
